<div class="blade-content ng-scope" id="blade-content">
  <div class="blade-inner">
    <div class="inner-block">
      <form name="form" class="form" (submit)="onCreate()" [formGroup]="formGroup" novalidate>
        <div class="blade-static __bottom" *ngIf="currentBlade.isNew">
          <button class="btn" [disabled]="!formGroup.valid">创建</button>
        </div>
        <div class="">
          <div class="form-group">
            <label class="form-label">测点名称</label>
            <div class="form-input">
              <input placeholder="输入测点名称" name="tagName" formControlName="tagName">
            </div>
            <div *ngIf="formErrors.tagName" class="form-error">
              {{ formErrors.tagName}}
            </div>
          </div>
          <div class="form-group">
            <label class="form-label">测点描述</label>
            <div class="form-input">
              <textarea placeholder="输入测点描述" name="tagDesc" formControlName="tagDesc"></textarea>
            </div>
            <div *ngIf="formErrors.tagDesc" class="form-error">
              {{ formErrors.tagDesc }}
            </div>
          </div>
          <div class="form-group">
            <label class="form-label">测点Key</label>
            <div class="form-input">
              <input placeholder="输入测点Ke值" name="tagKey" formControlName="tagKey">
            </div>
            <div *ngIf="formErrors.tagKey" class="form-error">
              {{ formErrors.tagKey }}
            </div>
          </div>
          <div class="form-group">
            <label class="form-label">测点编码</label>
            <div class="form-input">
              <input placeholder="输入测点编码" name="tagCode" formControlName="tagCode">
            </div>
            <div *ngIf="formErrors.tagCode" class="form-error">
              {{ formErrors.tagCode }}
            </div>
          </div>
          <div class="form-group">
            <label class="form-label">测点单位</label>
            <div class="form-input">
              <input placeholder="输入测点单位" name="tagUnit" formControlName="tagUnit">
            </div>
            <div *ngIf="formErrors.tagUnit" class="form-error">
              {{ formErrors.tagUnit }}
            </div>
          </div>
          <div class="form-group">
            <label class="form-label">所属结构</label>
            <div class="form-input">
              <select name="turbComponentId" formControlName="turbComponentId">
                <option [value]="c.turbComponentId" *ngFor="let c of turbComponentList">
                  {{c.turbComponentName}}
                </option>

              </select>
            </div>
          </div>
          <div class="form-group">
            <label class="form-label">数据类型</label>
            <div class="form-input">
              <select name="tagKind" formControlName="tagKind">
                <option value="1">
                  模拟量
                </option>
                <option value="2">
                  开关量
                </option>
              </select>
            </div>
          </div>

          <div class="form-group">
            <label class="form-label">是否显示</label>
            <div class="form-control __checkbox">
              <label class="form-label" *ngFor="let item of tagSets;let i=index">
                <input type="checkbox" [formControlName]="item.valueCode">
                <span class="check"></span>
                <span class="name">{{item.valueDisplay}}</span>
              </label>
            </div>
          </div>

          <div class="form-group">
            <label class="form-label">最小值</label>
            <div class="form-input">
              <input placeholder="输入最小值" name="tagMin" formControlName="tagMin" type="number">
            </div>
            <div *ngIf="formErrors.tagMin" class="form-error">
              {{ formErrors.tagMin }}
            </div>
          </div>
          <div class="form-group">
            <label class="form-label">最大值</label>
            <div class="form-input">
              <input placeholder="输入最大值" name="tagMax" formControlName="tagMax" type="number">
            </div>
            <div *ngIf="formErrors.tagMax" class="form-error">
              {{ formErrors.tagMax }}
            </div>
          </div>

        </div>
      </form>

      <!-- <div class="form-group tag-bottom ">
        <label class="form-label">测点类型</label>
        <div class="form-input" id="form-input-switch">
          <label class="form-label __switch">
            <input type="checkbox" name="defaultValue" [(ngModel)]="tagDefinition" class="ng-pristine ng-untouched ng-valid">            
            <span class="switch"></span>
          </label>
        </div>
      </div> -->

      <!-- <div class="form-group">
        <label class="form-label"></label>
        <div class="form-control __checkbox">
          <label class="form-label" *ngFor="let item of tagSets;let i=index">
            <input type="radio" [formControlName]="item.valueCode">
            <span class="check"></span>
            <span class="name">{{item.valueDisplay}}</span>
          </label>
        </div>
      </div> -->

      <div class="form-group">
        <label class="form-label">测点类型</label>
        <div class="form-control __checkbox">
          <label class="form-label" *ngFor="let item of tagTypes;">
              <!-- [checked]="item.tagId==basicsRoleId" -->
                <input  [checked]="item.valueCode==tagTypeId" name="config" (click)="onTagTypeIsChecked($event.target.checked,item.valueCode)" [value]="item.valueCode" type="radio">                  
                  <span class="check"></span>
                  <span class="name">{{item.valueDisplay}}</span>
              </label>
        </div>
      </div>


    </div>
  </div>
</div>